GetTrackNextInterestingTime
TheGetTrackNextInterestingTime
function searches for times of interest in a track.
pascal void GetTrackNextInterestingTime (Track theTrack, short interestingTimeFlags, TimeValue time, Fixed rate, TimeValue *interestingTime, TimeValue *interestingDuration);
theTrack
- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
andGetMovieTrack
(described on page 2-136 and page 2-188, respectively).interestingTimeFlags
- Specifies the search criteria. Note that you may set only one of the
nextTimeMediaSample
,nextTimeMediaEdit
,nextTimeTrackEdit
andnextTimeSyncSample
flags to 1. The following flags are available (set unused flags to 0):nextTimeMediaSample
- Searches for the next sample in the track's media. Set this flag to 1 to search for the next sample.
nextTimeMediaEdit
- Searches for the next group of samples in the track's media. Set this flag to 1 to search for the next group of samples.
nextTimeTrackEdit
- Searches for the media sample that corresponds to the next entry in a track's media edit list. The end of the track is considered an empty edit. Set this flag to 1 to search for the next track edit.
nextTimeSyncSample
- Searches for the next sync sample in the track's media. Set this flag to 1 to search for the next sync sample.
- Sync samples do not rely on preceding frames for content. Some compression algorithms conserve space by eliminating duplication between consecutive frames in a sample.
nextTimeEdgeOK
- Instructs the Movie Toolbox that you are willing to receive information about elements that begin or end at the time specified by the
time
parameter. Set this flag to 1 to accept this information.- This flag is especially useful at the beginning or end of a track. The function returns valid information about the beginning and end of the track.
nextTimeIgnoreActiveSegment
- Instructs the Movie Toolbox to look outside of the active segment for samples that meet the search criteria. Set this flag to 1 to search outside of the active segment.
time
- Specifies a time value that establishes the starting point for the search. This time value must be expressed in the movie's time scale.
rate
- Contains the search direction. Negative values cause the Movie Toolbox to search backward from the starting point specified in the
time
parameter. Other values cause a forward search.interestingTime
- Contains a pointer to a time value. The Movie Toolbox returns the first time value it finds that meets the search criteria specified in the
flags
parameter. This time value is in the movie's time scale.- If there are no times that meet the search criteria you specify, the Movie Toolbox sets this value to -1.
- Set this parameter to
nil
if you are not interested in this information.interestingDuration
- Contains a pointer to a time value. The Movie Toolbox returns the duration of the interesting time. This time value is in the movie's time coordinate system. Set this parameter to
nil
if you do not want this information--in this case, the function works more quickly.ERROR CODES
invalidTrack -2009 This track is corrupted or invalid invalidTime -2015 This time value is invalid